$OpenBSD: patch-version_c,v 1.4 2015/07/23 22:19:03 jca Exp $
--- version.c.orig	Sat May  3 15:50:07 2014
+++ version.c	Thu Jul 23 13:47:13 2015
@@ -16,7 +16,6 @@
 
 #include <stdio.h>
 #include <ctype.h>
-#include <tzfile.h>
 #include <string.h>
 #include <errno.h>
 #include <sys/param.h>
@@ -25,7 +24,6 @@
 #include <sys/socket.h>
 #include <net/if.h>
 #include <netinet/in.h>
-#include <netmpls/mpls.h>
 #include "externs.h"
 
 int
@@ -38,7 +36,7 @@ version(int argc, char **argv)
 	size_t len;
 	time_t c;
 	uint64_t physmem;
-	int mib[5], ipdrops, mplsdrops, pntd, weeks, days, hours, mins;
+	int mib[5], ipdrops, pntd, weeks, days, hours, mins;
 
 	mib[0] = CTL_HW;
 	mib[1] = HW_PHYSMEM64;
@@ -78,15 +76,6 @@ version(int argc, char **argv)
 		printf("%% IFQ_DROPS: %s\n", strerror(errno));
 		return(1);
 	}
-	mib[0] = CTL_NET;
-	mib[1] = PF_MPLS;
-	mib[2] = MPLSCTL_IFQUEUE;
-	mib[3] = IFQCTL_DROPS;
-	len = sizeof(mplsdrops);
-	if (sysctl(mib, 4, &mplsdrops, &len, NULL, 0) == -1) {
-		printf("%% MPLS_IFQCTL_DROPS: %s\n", strerror(errno));
-		return(1);
-	}
 	if (uname(&un)) {
 		printf("%% uname: %s\n", strerror(errno));
 		return(1);
@@ -98,15 +87,14 @@ version(int argc, char **argv)
 	printf("Compiled %s by %s@%s\n", compiled, compiledby, compilehost);
 	printf("uptime: ");
 	pntd = 0;
-#define SECSPERWEEK (SECSPERDAY * DAYSPERWEEK)
-	weeks = c / SECSPERWEEK;
-	c %= SECSPERWEEK;
-	days = c / SECSPERDAY;
-	c %= SECSPERDAY;
-	hours = c / SECSPERHOUR;
-	c %= SECSPERHOUR;
-	mins = c / SECSPERMIN;
-	c %= SECSPERMIN;
+	weeks = c / (7 * 24 * 60 * 60);
+	c %= (7 * 24 * 60 * 60);
+	days = c / (24 * 60 * 60);
+	c %= (24 * 60 * 60);
+	hours = c / (60 * 60);
+	c %= (60 * 60);
+	mins = c / 60;
+	c %= 60;
 	if (weeks) {
 		printf("%d week%s", weeks, weeks == 1 ? "" : "s");
 		pntd = 1;
@@ -134,7 +122,7 @@ version(int argc, char **argv)
 	printf("cpu: %s\n", cpubuf);
 	printf("memory: %sB\n", format_k(physmem / 1024));
 	printf("kernel: %s", kernver);
-	printf("IFQ drops: ip %d mpls %d\n", ipdrops, mplsdrops);
+	printf("IFQ drops: ip %d\n", ipdrops);
 	return(0);
 }
 
